import request from '@/utils/request'

export function addProjectItem(data) {
  return request({
    url: 'api/ProjectItemInfo/Insert',
    method: 'post',
    data
  })
}

export function updProjectItem(data) {
  return request({
    url: 'api/ProjectItemInfo/Update',
    method: 'post',
    data
  })
}

export function delProjectItemInfo(id) {
  return request({
    url: 'api/ProjectItemInfo/Delete',
    method: 'post',
    params: {
      id: id
    }
  })
}

export function getProjectItemInfo(data) {
  return request({
    url: 'api/ProjectItemInfo/GetAllByProjectId',
    method: 'post',
    data
  })
}

export function getProjectItemById(id) {
  return request({
    url: 'api/ProjectItemInfo/GetProjectItemInfoByFinancer',
    method: 'get',
    params: {
      itemId: id
    }
  })
}

export function getProjectItemByManager(id) {
  return request({
    url: 'api/ProjectItemInfo/GetProjectItemInfoByManager',
    method: 'get',
    params: {
      itemId: id
    }
  })
}

